import request from "@/utils/request.js";
import httpRequest from "@/utils/httpRequest.js";

// 分页查询审批任务列表
export function reqApprovalTaskList(parameter) {
  return request({
    url: "/klApprovalInstances/createApprovalTasks",
    method: 'get',
    params: parameter
  })
}

//审批更新
export function reqApprovalTask(parameter){
  return request({
    url:"/klApprovalTasks",
    method:"put",
    data:parameter
  })
}

//再次申请审批
export function reqReApprovalTask(params){
  return request({
    url:"/klApprovalInstances/request/approval",
    method:"get",
    params
  })
}

//根据采购需求获取物料明细
export function reqMaterialInfoByCode(purchaseRequestCode){
  return request({
    url:"/klApprovalInstances/showRequestOrder/byCode?purchaseRequestCode=" + purchaseRequestCode,
    method:"get"
  })
}